<template>
	<view>
		<view>
			<navTop title="社团审核" :isHeight="false" hasBgc="white" :color="navtop.color" :isBack="true"></navTop>
		</view>
		<view class="examineCard">
			<examineCard_association v-for="(item,index) in data" :item="item" :key="index" :title="item.nickName"
				:src="item.avatarUrl" :id="item.id" :assostionName="assostionName" :assostionId="assostionId">
			</examineCard_association>
		</view>
		<!-- <view class="allPassBorder">
			<image class="allPassImg" src="https://img01-xusong.91q.com/FEF58342-0D41-412D-86F7-B906286E8D11.png">
			</image>
			<view class="allPassText" @click="agreeAll()">全部通过</view>
		</view> -->
	</view>
</template>

<script>
	import navTop from '../../components/navTop.vue'
	import examineCard_association from '../../components/examineCard_association.vue'
	export default {
		components: {
			navTop,
			examineCard_association
		},
		data() {
			return {
				navtop: {
					title: 'XXX',
					color: '#000000'
				},
				user_Id: this.$store.state.userInfo.id,
				assostionId: '',
				data: [],
				assostionName: '',
			}
		},
		methods: {
			getData() {
				let that = this;
				console.log(this.user_Id);
				console.log(this.assostionId);
				uni.request({
					url: 'https://www.codingyt.com/club/userOrganization/select',
					data: {
						organizationId: this.assostionId,
						// role: 'pending',
					},
					success(res) {
						let tmpData=[]
						for (var i = 0; i < res.data.data.length; i++) {
							if(res.data.data[i].role==="pending"){
								tmpData.push(res.data.data[i])
							}
						}
						that.data = tmpData
					}
				})
			},
			agreeAll() {

			}
		},
		onLoad(item) {
			let data = JSON.parse(decodeURIComponent(item.data));
			this.assostionId = data.id;
			this.assostionName = data.name

			this.getData()
		}
	}
</script>

<style>
	.examineCard {
		position: absolute;
		top: 160rpx;
	}

	.allPassBorder {
		left: 424rpx;
		top: 1468rpx;
		width: 274rpx;
		height: 84rpx;
		border-radius: 62rpx;
		background-color: rgba(249, 193, 110, 100);
		color: rgba(255, 255, 255, 100);
		box-shadow: 0rpx 0rpx 12rpx 0rpx rgba(0, 0, 0, 0.4);
		position: fixed;
	}

	.allPassImg {
		left: 38rpx;
		top: 16rpx;
		width: 54rpx;
		height: 54rpx;
		position: absolute;
	}

	.allPassText {
		left: 100rpx;
		top: 20rpx;
		width: 142rpx;
		height: 48rpx;
		color: rgba(255, 255, 255, 100);
		font-size: 32rpx;
		text-align: left;
		;
		position: absolute;
	}
</style>
